package com.example.magical.normal.service.impl;

import com.alibaba.fastjson.JSON;
import com.example.magical.normal.service.CashaMainService;
import com.example.magical.normal.service.PreCheckedService;
import com.example.magical.normal.utils.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author weiqi
 * @date 2022年11月29日
 */
@Service
public class PreCheckedServiceImpl implements PreCheckedService {
    @Autowired
    private CashaMainService cashaMainService;

    @Override
    public void manualPreCheck() {
        cashaMainService.manualCheck();
    }

    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();
        map.putIfAbsent("1", "zhang");
        map.putIfAbsent("2", "wang");

        System.out.println("JSON.toJSONString(map) = " + JSON.toJSONString(map));


        Date startDate = DateUtil.stringToDate(DateUtil.getFirstDayTimeByPaymentDay("202311"), DateUtil.SIMPLE_FMT);
        System.out.println("startDate = " + startDate);


    }

}
